import os
import pytest
from loguru import logger


logger.add('zentao.log')
logger.info("这是一条info日志")
logger.info("这是一条debug日志")

result = 'test_data'
report = "test_report"

lst = ['.','-sv','--alluredir',result]


pytest.main(lst)

# 2. 通过Python运行allure
cmd = "allure generate {} -o {} -c".format(result,report)
os.system(cmd)